// PerformanceClass.cpp: implementation of the CPerformanceClass class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "PerformanceClass.h"

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

//##ModelId=4396837900C7
CPerformanceClass::CPerformanceClass()
{
	QueryPerformanceFrequency(&m_liFreq);
}

//##ModelId=4396837900C8
CPerformanceClass::~CPerformanceClass()
{	
}
//##ModelId=4396837900C5
void CPerformanceClass::Begin()
{
	QueryPerformanceCounter(&m_liBegin);
}

//##ModelId=4396837900C6
double CPerformanceClass::End()
{
	QueryPerformanceCounter(&m_liEnd);

	return ( (double)(m_liEnd.QuadPart-m_liBegin.QuadPart)/(double)m_liFreq.QuadPart );

}